﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Auth_Campos : System.Web.UI.UserControl, IViewStatePersist
{
	protected void Page_Load(object sender, EventArgs e)
	{

	}
	protected void lvListagem_ItemDataBound(object sender, ListViewItemEventArgs e)
	{
		using (ListViewDataItem item = e.Item as ListViewDataItem)
		{
			if (item != null && e.Item.ItemType == ListViewItemType.DataItem && item.DisplayIndex != lvListagem.EditIndex)
			{
				Label CampoTipoValorLabel = e.Item.FindControl("CampoTipoValorLabel") as Label;
				DataRowView drv = (e.Item as ListViewDataItem).DataItem as DataRowView;
				switch (drv["CampoTipoValor"].ToString())
				{
					case "D": CampoTipoValorLabel.Text = "Data"; break;
					case "I": CampoTipoValorLabel.Text = "Inteiro"; break;
					case "N": CampoTipoValorLabel.Text = "Numérico"; break;
					case "S": CampoTipoValorLabel.Text = "Texto"; break;
				}

			}
		}
	}

	#region IViewStatePersist Members

	public new object SaveViewState()
	{
		return base.SaveViewState();
	}

	public new void LoadViewState(object savedState)
	{
		base.LoadViewState(savedState);
	}

	#endregion
}
